#自省是通过一定的机制查询到对象的内部结构
from 类方法和静态方法和实例方法 import Date
class Person:
    '''
    __doc__:文档
    '''
    name="user"
    def get_age(self):
        return 2020-self.__birthday.year
class Student(Person):
    def __init__(self,school_name):
        self.shcool_name=school_name


if __name__ == '__main__':
    user=Student("mooc")

    #通过__dict__查询属性
    print(user.__dict__)
    user.__dict__['school_addr']='北京市'
    print(user.__dict__)
    user.sex='男'
    print(user.__dict__)
    print(user.name)
    print(Person.__dict__)
    print(dir(user))